package com.mt.grand.factory.func;

import com.mt.grand.factory.domain.Food;

/**
 * 工厂方法实例
 * Created by Administrator on 2018/3/4 0004.
 */
public class FactoryFuncTest {

    public static void main(String[] args) {

        AppleFactoryFunc appleFactoryFunc = new AppleFactoryFunc();
        OrangeFactoryFunc orangeFactoryFunc = new OrangeFactoryFunc();

        Food apple = appleFactoryFunc.getFood();
        Food orange = orangeFactoryFunc.getFood();

        System.out.println(apple.getName());
        System.out.println(orange.getName());
    }
}
